package com.baseproject.datasource;

import android.content.Context;

import com.baseproject.datasource.local.LocalDataSource;
import com.baseproject.datasource.remote.RemoteDataSource;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

/**
 * This is used by Dagger to inject the required arguments into the {@link Repository}.
 */
@Module
public class RepositoryModule {

    @Provides
    @Singleton
    Repository provideRepository(Context context) {
        return Repository.getInstance(RemoteDataSource.getInstance(), LocalDataSource.getInstance());
    }
}
